package cn.gnp.framework.eeamis.controller;

import java.util.ArrayList;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.gnp.framework.core.util.RestfulMessage;
import cn.gnp.framework.eeamis.model.goods.GoodsCodeModel;
import cn.gnp.framework.eeamis.model.goods.GoodsModel;

@Controller
@RequestMapping("/kfc/brands")
public class JSONController {
 
	@RequestMapping(value="{name}", method = RequestMethod.GET)
	public @ResponseBody RestfulMessage getShopInJSON(@PathVariable String name) {
		RestfulMessage restfulMessage = new RestfulMessage();
		restfulMessage.setSuccess(true);
		ArrayList<Object> data = new ArrayList<Object>();
		GoodsModel gm = new GoodsModel();
		gm.setDescription("dddd");
		data.add(gm);
		restfulMessage.setData(data);
		ArrayList<Object> code = new ArrayList<Object>();
		GoodsCodeModel gcm = new GoodsCodeModel();
		code.add(gcm);
		restfulMessage.setCode(code);
		return restfulMessage;
 	}
}